//
//  ViewController.m
//  UIHomeWork28_拉钩界面动画
//
//  Created by Gollum on 16/8/22.
//  Copyright © 2016年 Gollum. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *lgImgs;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *lgImgL;

@property (weak, nonatomic) IBOutlet UIView *textFieldView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *nameImgWidth;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *passImgWidth;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *nameTextWidth;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *passTextWidth;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *loginBtnleading;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *rightLineViewWidth;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *leftLineViewWidth;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}
- (void)viewDidAppear:(BOOL)animated{
   
    _lgImgL.priority = 500;
    _lgImgs.priority = 750;
    [UIView animateWithDuration:5 animations:^{
        _passImgWidth.constant = _textFieldView.frame.size.width / 10;
        _nameImgWidth.constant = _textFieldView.frame.size.width / 10;
        _nameTextWidth.constant = _textFieldView.frame.size.width / 10 * 9;
        _passTextWidth.constant = _textFieldView.frame.size.width / 10 * 9;
        _loginBtnleading.constant = 0;
        _rightLineViewWidth.constant = _textFieldView.frame.size.width / 2 - 20;
        _leftLineViewWidth.constant = _textFieldView.frame.size.width / 2 - 20;
        [self.view layoutIfNeeded];
    }];


}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
